<?php (defined('BASEPATH')) OR exit('No direct script access allowed');

class Client_Model extends CI_Model {
	
	private $table= 'clients';
	function __construct() {
		parent::__construct();
	}
	
	function find ($api){
		list($key,$code) = explode('-',$api);
    	$query = $this->db->get_where($this->table, array('api' => $key,'code'=>$code),1);
    	$result = $query->result();
    	return !empty($result)?$result[0]:false;
	}
	
}